<?php
/*************
#商品的管理
#lsj 2010-12-13
*************/

class goodsCtrl extends lib_ctrl
{
    public $Cname = '商品管理';
    protected $goods = null;

    
    /*
    * 初始化
    */
    public function _init()
    {
    	$this->group = $this->loadModel('group');
    	
    	$fmenus = array(1, 13, 24);
		$topmenus[] = array('id'=>1,'name'=>'首页','url'=>'/manage.php/manage/index');
		$topmenus[] = array('id'=>2,'name'=>'商家','url'=>'/manage.php/manage/index');
		$topmenus[] = array('id'=>3,'name'=>'商品','url'=>'/manage.php/manage/index');
		$topmenus[] = array('id'=>4,'name'=>'订单','url'=>'/manage.php/manage/index');
		$topmenus[] = array('id'=>5,'name'=>'会员','url'=>'/manage.php/manage/index');
		$topmenus[] = array('id'=>6,'name'=>'营销','url'=>'/manage.php/manage/index');
		$topmenus[] = array('id'=>7,'name'=>'系统','url'=>'/manage.php/manage/index');

        $leftmenus[0] = array('id'=>13,'name'=>'我的首页','url'=>'/manage.php/manage/index');
		$leftmenus[0]['children'][] = array('id'=>22,'name'=>'网站设置','url'=>'/manage.php/manage/index');
		$leftmenus[0]['children'][] = array('id'=>23,'name'=>'商品列表','url'=>'/manage.php/manage/index');
		$leftmenus[0]['children'][] = array('id'=>24,'name'=>'用户订单','url'=>'/manage.php/manage/index');
		$leftmenus[1] = array('id'=>15,'name'=>'会员管理','url'=>'/manage.php/manage/index');
		$leftmenus[1]['children'][] = array('id'=>26,'name'=>'站点营销','url'=>'/manage.php/manage/index');
		$leftmenus[1]['children'][] = array('id'=>27,'name'=>'系统设置','url'=>'/manage.php/manage/index');

		$rightmenus[0] = array('id'=>24, 'name'=>'添加新用户组', 'url'=>'/manage.php?a=sysgroup&c=add', call=>'iframe');
		//$rightmenus[1] = array('id'=>25, 'name'=>'批量删除', 'url'=>'/manage.php?a=sysgroup&c=add', call=>'ajax');
		
		$this->view->assign('TITLE', $this->Cname);
		$this->view->assign('fmenus', $fmenus);
    	$this->view->assign('topmenus', $topmenus);
    	$this->view->assign('leftmenus', $leftmenus);
    	$this->view->assign('rightmenus', $rightmenus);
    }
    
    /*
    * 组列表
    */
	public function indexAct()
	{
		$res = $this->group->getGroup();
		$this->view->assign('res', $res);
		$this->view->display();
	}

    /*
    * 组权限列表
    */
	public function powerAct()
	{
		$gid = abs(intval($_REQUEST['gid']));
		$res = $this->group->getGroup($gid, 'powers');
		

	}

    /*
    * 编辑组权限
    */
	public function editpowerAct()
	{


	}

    /*
    *添加组
    */
	public function addAct()
	{


	}

    /*
    * 修改组信息
    */
	public function editAct()
	{


	}

    /*
    * 删除组
    */
	public function delAct()
	{


	}






}


?>